사이트 내 전체검색
Fade Background
로빈아빠
https://cmd.kr/javascript/616 URL이 복사되었습니다.

본문

Fade Background
 
<script language="JavaScript"> 
<!-- 
function namosw_fade_background(r1, g1, b1, r2, g2, b2, maxstep) 
{ 
  var i, r, g, b; 
  for (i = 0; i <= maxstep; i++) { 
    r = Math.floor((r1*(maxstep-i) + r2*i)/maxstep); 
    g = Math.floor((g1*(maxstep-i) + g2*i)/maxstep); 
    b = Math.floor((b1*(maxstep-i) + b2*i)/maxstep); 
    namosw_fade_setbgcolor(r, g, b) 
  } 
} 

function namosw_fade_setbgcolor() 
{ 
  var hexchars = '0123456789abcdef'; 
  var i; 
  var color_str = '#'; 
  var args = namosw_fade_setbgcolor.arguments; 
  if (args.length != 3) 
    return; 
  for (i = 0; i < 3; i++) { 
    color_str += hexchars.charAt(Math.floor(args[i]/16)); 
    color_str += hexchars.charAt(args[i]%16); 
  } 
  document.bgColor = color_str; 
} 

// --> 
</script> 

<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" OnLoad="namosw_fade_background(0, 0, 0, 255, 255, 255, 20);">.. 

댓글목록

등록된 댓글이 없습니다.

831 (3/17P)

Search

Copyright © Cmd 명령어 18.189.43.74